package com.itheima.wisdomnext.entity;

import com.fasterxml.jackson.annotation.JsonInclude;

import java.util.List;

public class Message {

    private Integer id;            // 消息 ID
    private Integer userId;        // 用户 ID
    private List<Users> users; // 发布人信息列表
    private Integer adminId;       // 管理员 ID，可能为空
    @JsonInclude(JsonInclude.Include.NON_NULL) // 仅在 isFollowing 不为 null 时返回
    private Integer recipientId;   // 接收消息的用户ID
    @JsonInclude(JsonInclude.Include.NON_NULL) // 仅在 isFollowing 不为 null 时返回
    private List<Users> recipien; // 发布人信息列表
    private String messageType;    // 消息类型，text 或 image
    private String messageText;    // 消息内容，可能为空
    private String imageUrl;       // 图片链接，可能为空
    private Boolean isRead;        // 是否已读
    private String createdAt;      // 消息发送时间

//    //websocket私信名字
//    private String Name;

    // Getter 和 Setter 方法
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getAdminId() {
        return adminId;
    }

    public void setAdminId(Integer adminId) {
        this.adminId = adminId;
    }

    public Integer getRecipientId() {
        return recipientId;
    }

    public void setRecipientId(Integer recipientId) {
        this.recipientId = recipientId;
    }

    public String getMessageType() {
        return messageType;
    }

    public void setMessageType(String messageType) {
        this.messageType = messageType;
    }

    public String getMessageText() {
        return messageText;
    }

    public void setMessageText(String messageText) {
        this.messageText = messageText;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public Boolean getIsRead() {
        return isRead;
    }

    public void setIsRead(Boolean isRead) {
        this.isRead = isRead;
    }

    public String getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(String createdAt) {
        this.createdAt = createdAt;
    }

    public List<Users> getUsers() {
        return users;
    }

    public void setUsers(List<Users> users) {
        this.users = users;
    }

    public List<Users> getRecipien() {
        return recipien;
    }

    public void setRecipien(List<Users> recipien) {
        this.recipien = recipien;
    }

//    public String getName() {
//        return Name;
//    }
//
//    public void setName(String name) {
//        Name = name;
//    }
}
